
<div class="speedbar">
    <div class="speedbar-content">
        <ul class="menu-speedbar">
            <li><a href="<?php echo Yii::app()->createUrl('admin/settings/admin'); ?>" class="act_link">Quản lý cài đặt chung</a></li>

        </ul>
    </div>
</div>
<div class="content">
    <div class="grid">
        <div class="grid-title">
            <div class="pull-left">Cập nhật cài đặt</div>
            <div class="pull-right"></div>
            <div class="clear"></div>
        </div>
        <div class="grid-content">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'settings-form',
                'enableAjaxValidation' => false,
                'htmlOptions' => array('enctype' => 'multipart/form-data'),
            ));
            ?>
            <div class="formRow">
                <?php echo $form->labelEx($model, 'key'); ?>
                <div class="formRight">
                    <?php echo $form->textField($model, 'key', array('size' => 60, 'maxlength' => 100)); ?>
                </div>
            </div>
            <div class="formRow">
                <?php echo $form->labelEx($model, 'value'); ?>
                <div class="formRight">
                    <?php echo $form->fileField($model, 'image'); ?>
                </div>
                <?php if (!empty($model->value)): ?>
                    <?php // echo $form->hiddenField($model, 'image_hidden', array('value' => $model->image)); ?>
                    <div style="clear: both;">
                        <?php echo CHtml::image($model->urlPhoto); ?>
                    </div>
                <?php endif; ?>
            </div>


            <div class="formRow">
                <?php echo CHtml::submitButton($model->isNewRecord ? 'Lưu' : 'Cập nhật'); ?>
            </div>

            <?php $this->endWidget(); ?>
        </div>
    </div>
</div>


